package com.tony;

public class BreakTest {
    public static void break1(){
        ok:
            for(int i=0;i<10;i++){
                for(int j=0;j<10;j++){
                    System.out.println("i=" + i + ",j=" + j);
                    if(j == 5) break ok;
                }
            }
         System.out.println("break method");
    }

    public static void break2(){
        for(int i=0;i<10;i++){
            ok:
                for(int j=0;j<10;j++){
                    System.out.println("i=" + i + ",j=" + j);
                    if(j == 5) break ok;
                }
        }
        System.out.println("break method");
    }

    public static void main(String[] args) {
        break1();
        System.out.println("################");
        break2();
    }
}
